package com.xuhuan.admin.service.sysmenu.impl;


import com.xuhuan.admin.service.sysmenu.SysMenuService;
import com.xuhuan.admin.vo.sysmenu.SysMenuInfoVO;
import java.util.ArrayList;
import java.util.List;
import org.springframework.stereotype.Service;

/**
 * @author: huan.xu
 * @create: 2024/7/9 13:13
 * @description: 菜单service实现类
 **/
@Service
public class SysMenuServiceImpl implements SysMenuService {

  /**
   * 查询菜单列表
   *
   * @return
   */
  @Override
  public List<SysMenuInfoVO> findSysMenuList() {
    List<SysMenuInfoVO> sysMenuInfoVOList = new ArrayList<>();
    List<SysMenuInfoVO> componentsChildList = new ArrayList<>();
    componentsChildList.add(new SysMenuInfoVO(101l, "Alerts", "bi bi-circle", 1, "",null));
    componentsChildList.add(new SysMenuInfoVO(102l, "Accordion", "bi bi-circle", 2, "",null));
    componentsChildList.add(new SysMenuInfoVO(103l, "Badges", "bi bi-circle", 3, "",null));
    componentsChildList.add(new SysMenuInfoVO(104l, "Breadcrumbs", "bi bi-circle", 4, "",null));
    componentsChildList.add(new SysMenuInfoVO(105l, "Buttons", "bi bi-circle", 5, "",null));
    componentsChildList.add(new SysMenuInfoVO(106l, "Cards", "bi bi-circle", 6, "",null));
    componentsChildList.add(new SysMenuInfoVO(107l, "Carousel", "bi bi-circle", 7, "",null));
    componentsChildList.add(new SysMenuInfoVO(108l, "List group", "bi bi-circle", 8, "",null));
    componentsChildList.add(new SysMenuInfoVO(109l, "Modal", "bi bi-circle", 9, "",null));
    componentsChildList.add(new SysMenuInfoVO(110l, "Tabs", "bi bi-circle", 10, "",null));
    componentsChildList.add(new SysMenuInfoVO(111l, "Pagination", "bi bi-circle", 11, "",null));
    componentsChildList.add(new SysMenuInfoVO(112l, "Progress", "bi bi-circle", 12, "",null));
    componentsChildList.add(new SysMenuInfoVO(113l, "Spinners", "bi bi-circle", 13, "",null));
    componentsChildList.add(new SysMenuInfoVO(114l, "Tooltips", "bi bi-circle", 14, "",null));
    sysMenuInfoVOList.add(
        new SysMenuInfoVO(1l, "Components", "bi bi-menu-button-wide", 1, "",componentsChildList));

    List<SysMenuInfoVO> formsChildList = new ArrayList<>();
    formsChildList.add(new SysMenuInfoVO(201l, "Form Elements", "bi bi-circle", 1, "",null));
    formsChildList.add(new SysMenuInfoVO(202l, "Form Layouts", "bi bi-circle", 2, "",null));
    formsChildList.add(new SysMenuInfoVO(203l, "Form Editors", "bi bi-circle", 3, "",null));
    formsChildList.add(new SysMenuInfoVO(204l, "Form Validation", "bi bi-circle", 4, "",null));
    sysMenuInfoVOList.add(
        new SysMenuInfoVO(2l, "Forms", "bi bi-journal-text", 2, "", formsChildList));

    List<SysMenuInfoVO> tablesChildList = new ArrayList<>();
    tablesChildList.add(new SysMenuInfoVO(301l, "General Tables", "bi bi-circle", 1, "",null));
    tablesChildList.add(new SysMenuInfoVO(302l, "Data Tables", "bi bi-circle", 2, "",null));
    sysMenuInfoVOList.add(
        new SysMenuInfoVO(3l, "Tables", "bi bi-layout-text-window-reverse", 3, "",
            tablesChildList));

    List<SysMenuInfoVO> chartsChildList = new ArrayList<>();
    chartsChildList.add(new SysMenuInfoVO(401l, "Chart.js", "bi bi-circle", 1, "",null));
    chartsChildList.add(new SysMenuInfoVO(402l, "ApexCharts", "bi bi-circle", 2, "",null));
    chartsChildList.add(new SysMenuInfoVO(403l, "ECharts", "bi bi-circle", 3, "",null));
    sysMenuInfoVOList.add(
        new SysMenuInfoVO(4l, "Charts", "bi bi-bar-chart", 4, "", chartsChildList));

    List<SysMenuInfoVO> iconsChildList = new ArrayList<>();
    iconsChildList.add(new SysMenuInfoVO(501l, "Bootstrap Icons", "bi bi-circle", 1, "",null));
    iconsChildList.add(new SysMenuInfoVO(502l, "Remix Icons", "bi bi-circle", 2, "",null));
    iconsChildList.add(new SysMenuInfoVO(503l, "Boxicons", "bi bi-circle", 3, "",null));
    sysMenuInfoVOList.add(new SysMenuInfoVO(5l, "Icons", "bi bi-gem", 5, "", iconsChildList));

    sysMenuInfoVOList.add(new SysMenuInfoVO(6l, "Profile", "bi bi-person", 6, "",null));
    sysMenuInfoVOList.add(new SysMenuInfoVO(7l, "F.A.Q", "bi bi-question-circle", 7, "",null));
    sysMenuInfoVOList.add(new SysMenuInfoVO(8l, "Contact", "bi bi-envelope", 8, "",null));
    sysMenuInfoVOList.add(new SysMenuInfoVO(9l, "Register", "bi bi-card-list", 9, "",null));
    sysMenuInfoVOList.add(
        new SysMenuInfoVO(10l, "Login", "bi bi-box-arrow-in-right", 10, "",null));
    sysMenuInfoVOList.add(new SysMenuInfoVO(11l, "Error 404", "bi bi-dash-circle", 11, "",null));
    sysMenuInfoVOList.add(new SysMenuInfoVO(12l, "Blank", "bi bi-file-earmark", 12, "",null));
    return sysMenuInfoVOList;
  }

  /**
   * 返回菜单树
   *
   * @return
   */
  @Override
  public List<SysMenuInfoVO> findSysMenuTree() {
    return findSysMenuList();
  }
}
